coeffElim = () -> (
     
     R = QQ[a,b,c,e,f,m, x,y,z,t, Degrees=>{0,0,0,0,0,0,1,1,1,1}];

     quintic = (x+m*y+a*z)^2*t^3+(a^2*x^3+x*y*(b*x+c*y)+m^2*y^3+(e*x^2+f*x*y+c*y^2)*z+(b*x+e*y)*z^2+z^3)*t^2+(2*a*x^3*y+e*x^2*y^2+2*a*m*x*y^3+(2*a*m*x^3+f*x^2*y+f*x*y^2+2*m*y^3)*z+(c*x^2+f*x*y+b*y^2)*z^2+2*(m*x+a*y)*z^3)*t+x^3*y^2+a^2*x^2*y^3+x*y*z*(2*m*x^2+b*x*y+2*a*y^2)+z^2*(m^2*x^3+c*x^2*y+e*x*y^2+y^3)+(m*x+a*y)^2*z^3;
     myquintic = sub(quintic, {t=>1, x=>x-m*y-a*z}); -- dehomogenize and make quadratic part square of linear term.
     
     q3 = part(3, sub(myquintic, x=>0)); -- Cubic part after killing quadratic part.
     
     blowup = sub(sub(myquintic,{x=>x*z,y=>y*z})/z^2,R); -- Blowup in the direction of z.
     
     p2 = part(2,blowup); -- Quadratic part after the blowup.
     p3 = part(3,blowup); -- Cubic part after the blowup.
     
     g1 = -3*a^3*m^2 + 2*a*b*m + e*m^2 - a*c - f*m + c;
     g2 = -3*a^4*m + a^2*b + 2*a*e*m - a*f - b*m + e;
     g3 = -a^5 + a^2*e - a*b + 1;
     g4 = -6*a^4*b + 4*a^2*c + 12*a^5*e - b^2 + 4*a*b*e - 4*a^2*e^2 - 8*a*m - 8*a^4*m - 9*a^8; 
     g5 = m*b + 3*a^3*m*b - a*b*c + a^2*c*e - 4*a^4*m*e - a^2*m^2 + a^3*m^2 - 3*a^4*m + 3*a^7*m;
     g6 = -6*a^3*m*b + 6*a^5*b + 4*a*m*c + 18*a^4*m*e - 2*a*f + 2*a^2*f - 3*a^4*f + 2*a*b^2 + 2*m*b*e - 4*a^2*b*e - b*f + 2*a*e*f - 4*a*m*e^2 + 4*a - 12*a^3*m^2 - 18*a^7*m - 4*a^4 - 4*m^2;
     
     h5 = -27*a^11 + 36*a^8*c + 9*a^8*e - 18*a^7*b - 36*a^7*m - 12*a^5*c^2 - 12*a^5*c*e + 12*a^5*c + 12*a^4*b*c + 6*a^4*b*e + 24*a^4*c*m - 3*a^3*b^2 + 4*a^2*c^2*e - 12*a^4*m - 12*a^3*b*m - 4*a^3*m^2 - 8*a^2*c^2 - 4*a*b*c*e + 4*a^2*m^2 + 4*a*b*c + b^2*e + 8*a*c*m - 4*b*m;

     R1 = R[r];
     
     A = r^2;
     B = -(1/7)*(2*r^2-13*r-18);
     C = (73*r^2+75*r+92)*(1/49);
     E = -(r^2-24*r-9)*(1/7);
     F = (181*r^2+241*r+163)*(1/49);
     M = (3*r^2+5*r+1)*(1/7);
     
     gg1 = sub(g1, R1);
     gg1 = sub(gg1, {a => A, b => B, c => C, e => E, f => F, m => M});

     gg2 = sub(g2, R1);
     gg2 = sub(gg2, {a => A, b => B, c => C, e => E, f => F, m => M});

     gg3 = sub(g3, R1);
     gg3 = sub(gg3, {a => A, b => B, c => C, e => E, f => F, m => M});

     gg4 = sub(g4, R1);
     gg4 = sub(gg4, {a => A, b => B, c => C, e => E, f => F, m => M});
     
     gg5 = sub(g5, R1);
     gg5 = sub(gg5, {a => A, b => B, c => C, e => E, f => F, m => M});
     
     gg6 = sub(g6, R1);
     gg6 = sub(gg6, {a => A, b => B, c => C, e => E, f => F, m => M});
     
     hh5 = sub(h5, R1);
     hh5 = sub(hh5, {a => A, b => B, c => C, e => E, f => F, m => M});
     
     
     R2 = R1/ideal(r^3 + r^2 - 1);
     
     ggg1 = sub(gg1, R2);
     ggg2 = sub(gg2, R2);
     ggg3 = sub(gg3, R2);
     ggg4 = sub(gg4, R2);
     ggg5 = sub(gg5, R2);
     ggg6 = sub(gg6, R2);
     
     hhh5 = sub(hh5, R2);

     )